package com.ol.edu.server.service.Authority.impl;


import com.ol.edu.server.entity.ResourceCategory;
import com.ol.edu.server.mapper.ResourceCategoryMapper;
import com.ol.edu.server.service.Authority.ResourceCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Roger
 * @date 2020/9/9 10:11
 * @description
 */
@Service
public class ResourceCategoryServiceImpl implements ResourceCategoryService {

    @Autowired
    private ResourceCategoryMapper resourceCategoryMapper;
    /*
        查询资源分类信息列表
     */
    @Override
    public List<ResourceCategory> findAllResourceCategory() {
        return resourceCategoryMapper.findAllResourceCategory();
    }

    /*
        添加资源分类
     */
    @Override
    public void saveResourceCategory(ResourceCategory resourceCategory) {
        resourceCategoryMapper.save(resourceCategory);
    }

    /*
        修改资源分类
     */
    @Override
    public void updateResourceCategory(ResourceCategory resourceCategory) {
        resourceCategoryMapper.update(resourceCategory);
    }

    /*
        删除资源分类
     */
    @Override
    public void deleteResourceCategory(Integer id) {
        resourceCategoryMapper.deleteResourceCategory(id);
    }
}
